<!DOCTYPE html><html><head>
<title>math::special - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'special.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004 Arjen Markus &amp;lt;arjenmarkus@users.sourceforge.net&amp;gt;
   -->
<!-- math::special.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::special(n) 0.4 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::special - Special mathematical functions</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">OVERVIEW</a></li>
<li class="doctools_section"><a href="#section3">PROCEDURES</a></li>
<li class="doctools_section"><a href="#section4">THE ORTHOGONAL POLYNOMIALS</a></li>
<li class="doctools_section"><a href="#section5">REMARKS ON THE IMPLEMENTATION</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.5?</span></b></li>
<li>package require <b class="pkgname">math::special <span class="opt">?0.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::special::eulerNumber</b> <i class="arg">index</i></a></li>
<li><a href="#2"><b class="cmd">::math::special::bernoulliNumber</b> <i class="arg">index</i></a></li>
<li><a href="#3"><b class="cmd">::math::special::Beta</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#4"><b class="cmd">::math::special::incBeta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">x</i></a></li>
<li><a href="#5"><b class="cmd">::math::special::regIncBeta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">x</i></a></li>
<li><a href="#6"><b class="cmd">::math::special::Gamma</b> <i class="arg">x</i></a></li>
<li><a href="#7"><b class="cmd">::math::special::digamma</b> <i class="arg">x</i></a></li>
<li><a href="#8"><b class="cmd">::math::special::erf</b> <i class="arg">x</i></a></li>
<li><a href="#9"><b class="cmd">::math::special::erfc</b> <i class="arg">x</i></a></li>
<li><a href="#10"><b class="cmd">::math::special::invnorm</b> <i class="arg">p</i></a></li>
<li><a href="#11"><b class="cmd">::math::special::J0</b> <i class="arg">x</i></a></li>
<li><a href="#12"><b class="cmd">::math::special::J1</b> <i class="arg">x</i></a></li>
<li><a href="#13"><b class="cmd">::math::special::Jn</b> <i class="arg">n</i> <i class="arg">x</i></a></li>
<li><a href="#14"><b class="cmd">::math::special::J1/2</b> <i class="arg">x</i></a></li>
<li><a href="#15"><b class="cmd">::math::special::J-1/2</b> <i class="arg">x</i></a></li>
<li><a href="#16"><b class="cmd">::math::special::I_n</b> <i class="arg">x</i></a></li>
<li><a href="#17"><b class="cmd">::math::special::cn</b> <i class="arg">u</i> <i class="arg">k</i></a></li>
<li><a href="#18"><b class="cmd">::math::special::dn</b> <i class="arg">u</i> <i class="arg">k</i></a></li>
<li><a href="#19"><b class="cmd">::math::special::sn</b> <i class="arg">u</i> <i class="arg">k</i></a></li>
<li><a href="#20"><b class="cmd">::math::special::elliptic_K</b> <i class="arg">k</i></a></li>
<li><a href="#21"><b class="cmd">::math::special::elliptic_E</b> <i class="arg">k</i></a></li>
<li><a href="#22"><b class="cmd">::math::special::exponential_Ei</b> <i class="arg">x</i></a></li>
<li><a href="#23"><b class="cmd">::math::special::exponential_En</b> <i class="arg">n</i> <i class="arg">x</i></a></li>
<li><a href="#24"><b class="cmd">::math::special::exponential_li</b> <i class="arg">x</i></a></li>
<li><a href="#25"><b class="cmd">::math::special::exponential_Ci</b> <i class="arg">x</i></a></li>
<li><a href="#26"><b class="cmd">::math::special::exponential_Si</b> <i class="arg">x</i></a></li>
<li><a href="#27"><b class="cmd">::math::special::exponential_Chi</b> <i class="arg">x</i></a></li>
<li><a href="#28"><b class="cmd">::math::special::exponential_Shi</b> <i class="arg">x</i></a></li>
<li><a href="#29"><b class="cmd">::math::special::fresnel_C</b> <i class="arg">x</i></a></li>
<li><a href="#30"><b class="cmd">::math::special::fresnel_S</b> <i class="arg">x</i></a></li>
<li><a href="#31"><b class="cmd">::math::special::sinc</b> <i class="arg">x</i></a></li>
<li><a href="#32"><b class="cmd">::math::special::legendre</b> <i class="arg">n</i></a></li>
<li><a href="#33"><b class="cmd">::math::special::chebyshev</b> <i class="arg">n</i></a></li>
<li><a href="#34"><b class="cmd">::math::special::laguerre</b> <i class="arg">alpha</i> <i class="arg">n</i></a></li>
<li><a href="#35"><b class="cmd">::math::special::hermite</b> <i class="arg">n</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements several so-called special functions, like
the Gamma function, the Bessel functions and such.</p>
<p>Each function is implemented by a procedure that bears its name (well,
in close approximation):</p>
<ul class="doctools_itemized">
<li><p>J0 for the zeroth-order Bessel function of the first kind</p></li>
<li><p>J1 for the first-order Bessel function of the first kind</p></li>
<li><p>Jn for the nth-order Bessel function of the first kind</p></li>
<li><p>J1/2 for the half-order Bessel function of the first kind</p></li>
<li><p>J-1/2 for the minus-half-order Bessel function of the first kind</p></li>
<li><p>I_n for the modified Bessel function of the first kind of order n</p></li>
<li><p>Gamma for the Gamma function, erf and erfc for the error function and
the complementary error function</p></li>
<li><p>fresnel_C and fresnel_S for the Fresnel integrals</p></li>
<li><p>elliptic_K and elliptic_E (complete elliptic integrals)</p></li>
<li><p>exponent_Ei and other functions related to the so-called exponential
integrals</p></li>
<li><p>legendre, hermite: some of the classical orthogonal polynomials.</p></li>
</ul>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">OVERVIEW</a></h2>
<p>In the following table several characteristics of the functions in this
package are summarized: the domain for the argument, the values for the
parameters and error bounds.</p>
<pre class="doctools_example">
Family       | Function    | Domain x    | Parameter   | Error bound
-------------+-------------+-------------+-------------+--------------
Bessel       | J0, J1,     | all of R    | n = integer |   &lt; 1.0e-8
             | Jn          |             |             |  (|x|&lt;20, n&lt;20)
Bessel       | J1/2, J-1/2,|  x &gt; 0      | n = integer |   exact
Bessel       | I_n         | all of R    | n = integer |   &lt; 1.0e-6
             |             |             |             |
Elliptic     | cn          | 0 &lt;= x &lt;= 1 |     --      |   &lt; 1.0e-10
functions    | dn          | 0 &lt;= x &lt;= 1 |     --      |   &lt; 1.0e-10
             | sn          | 0 &lt;= x &lt;= 1 |     --      |   &lt; 1.0e-10
Elliptic     | K           | 0 &lt;= x &lt; 1  |     --      |   &lt; 1.0e-6
integrals    | E           | 0 &lt;= x &lt; 1  |     --      |   &lt; 1.0e-6
             |             |             |             |
Error        | erf         |             |     --      |
functions    | erfc        |             |             |
             |             |             |             |
Inverse      | invnorm     | 0 &lt; x &lt; 1   |     --      |   &lt; 1.2e-9
normal       |             |             |             |
distribution |             |             |             |
             |             |             |             |
Exponential  | Ei          |  x != 0     |     --      |   &lt; 1.0e-10 (relative)
integrals    | En          |  x &gt;  0     |     --      |   as Ei
             | li          |  x &gt; 0      |     --      |   as Ei
             | Chi         |  x &gt; 0      |     --      |   &lt; 1.0e-8
             | Shi         |  x &gt; 0      |     --      |   &lt; 1.0e-8
             | Ci          |  x &gt; 0      |     --      |   &lt; 2.0e-4
             | Si          |  x &gt; 0      |     --      |   &lt; 2.0e-4
             |             |             |             |
Fresnel      | C           |  all of R   |     --      |   &lt; 2.0e-3
integrals    | S           |  all of R   |     --      |   &lt; 2.0e-3
             |             |             |             |
general      | Beta        | (see Gamma) |     --      |   &lt; 1.0e-9
             | Gamma       |  x != 0,-1, |     --      |   &lt; 1.0e-9
             |             |  -2, ...    |             |
             | incBeta     |             |  a, b &gt; 0   |   &lt; 1.0e-9
             | regIncBeta  |             |  a, b &gt; 0   |   &lt; 1.0e-9
             | digamma     |  x != 0,-1  |             |   &lt; 1.0e-9
             |             |  -2, ...    |             |
             |             |             |             |
             | sinc        |  all of R   |     --      |   exact
             |             |             |             |
orthogonal   | Legendre    |  all of R   | n = 0,1,... |   exact
polynomials  | Chebyshev   |  all of R   | n = 0,1,... |   exact
             | Laguerre    |  all of R   | n = 0,1,... |   exact
             |             |             | alpha el. R |
             | Hermite     |  all of R   | n = 0,1,... |   exact
</pre>
<p><em>Note:</em> Some of the error bounds are estimated, as no
&quot;formal&quot; bounds were available with the implemented approximation
method, others hold for the auxiliary functions used for estimating
the primary functions.</p>
<p>The following well-known functions are currently missing from the package:</p>
<ul class="doctools_itemized">
<li><p>Bessel functions of the second kind (Y_n, K_n)</p></li>
<li><p>Bessel functions of arbitrary order (and hence the Airy functions)</p></li>
<li><p>Chebyshev polynomials of the second kind (U_n)</p></li>
<li><p>The incomplete gamma function</p></li>
</ul>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PROCEDURES</a></h2>
<p>The package defines the following public procedures:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::special::eulerNumber</b> <i class="arg">index</i></a></dt>
<dd><p>Return the index'th Euler number (note: these are integer values). As the
size of these numbers grows very fast, only a limited number are available.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">index</i></dt>
<dd><p>Index of the number to be returned (should be between 0 and 54)</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::math::special::bernoulliNumber</b> <i class="arg">index</i></a></dt>
<dd><p>Return the index'th Bernoulli number. As the size of the numbers grows very fast,
only a limited number are available.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">index</i></dt>
<dd><p>Index of the number to be returned (should be between 0 and 52)</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::math::special::Beta</b> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Compute the Beta function for arguments &quot;x&quot; and &quot;y&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>First argument for the Beta function</p></dd>
<dt>float <i class="arg">y</i></dt>
<dd><p>Second argument for the Beta function</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::math::special::incBeta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">x</i></a></dt>
<dd><p>Compute the incomplete Beta function for argument &quot;x&quot; with parameters &quot;a&quot; and &quot;b&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>First parameter for the incomplete Beta function, a &gt; 0</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>Second parameter for the incomplete Beta function, b &gt; 0</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the incomplete Beta function</p></dd>
</dl></dd>
<dt><a name="5"><b class="cmd">::math::special::regIncBeta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">x</i></a></dt>
<dd><p>Compute the regularized incomplete Beta function for argument &quot;x&quot; with parameters &quot;a&quot; and &quot;b&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>First parameter for the incomplete Beta function, a &gt; 0</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>Second parameter for the incomplete Beta function, b &gt; 0</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the regularized incomplete Beta function</p></dd>
</dl></dd>
<dt><a name="6"><b class="cmd">::math::special::Gamma</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the Gamma function for argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Gamma function</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::math::special::digamma</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the digamma function (psi) for argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the digamma function</p></dd>
</dl></dd>
<dt><a name="8"><b class="cmd">::math::special::erf</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the error function for argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the error function</p></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">::math::special::erfc</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the complementary error function for argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the complementary error function</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">::math::special::invnorm</b> <i class="arg">p</i></a></dt>
<dd><p>Compute the inverse of the normal distribution function for argument &quot;p&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">p</i></dt>
<dd><p>Argument for the inverse normal distribution function
(p must be greater than 0 and lower than 1)</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">::math::special::J0</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the zeroth-order Bessel function of the first kind for the
argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Bessel function</p></dd>
</dl></dd>
<dt><a name="12"><b class="cmd">::math::special::J1</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the first-order Bessel function of the first kind for the
argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Bessel function</p></dd>
</dl></dd>
<dt><a name="13"><b class="cmd">::math::special::Jn</b> <i class="arg">n</i> <i class="arg">x</i></a></dt>
<dd><p>Compute the nth-order Bessel function of the first kind for the
argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">n</i></dt>
<dd><p>Order of the Bessel function</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Bessel function</p></dd>
</dl></dd>
<dt><a name="14"><b class="cmd">::math::special::J1/2</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the half-order Bessel function of the first kind for the
argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Bessel function</p></dd>
</dl></dd>
<dt><a name="15"><b class="cmd">::math::special::J-1/2</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the minus-half-order Bessel function of the first kind for the
argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Bessel function</p></dd>
</dl></dd>
<dt><a name="16"><b class="cmd">::math::special::I_n</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the modified Bessel function of the first kind of order n for
the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">x</i></dt>
<dd><p>Positive integer order of the function</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="17"><b class="cmd">::math::special::cn</b> <i class="arg">u</i> <i class="arg">k</i></a></dt>
<dd><p>Compute the elliptic function <em>cn</em> for the argument &quot;u&quot; and
parameter &quot;k&quot;.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">u</i></dt>
<dd><p>Argument for the function</p></dd>
<dt>float <i class="arg">k</i></dt>
<dd><p>Parameter</p></dd>
</dl></dd>
<dt><a name="18"><b class="cmd">::math::special::dn</b> <i class="arg">u</i> <i class="arg">k</i></a></dt>
<dd><p>Compute the elliptic function <em>dn</em> for the argument &quot;u&quot; and
parameter &quot;k&quot;.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">u</i></dt>
<dd><p>Argument for the function</p></dd>
<dt>float <i class="arg">k</i></dt>
<dd><p>Parameter</p></dd>
</dl></dd>
<dt><a name="19"><b class="cmd">::math::special::sn</b> <i class="arg">u</i> <i class="arg">k</i></a></dt>
<dd><p>Compute the elliptic function <em>sn</em> for the argument &quot;u&quot; and
parameter &quot;k&quot;.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">u</i></dt>
<dd><p>Argument for the function</p></dd>
<dt>float <i class="arg">k</i></dt>
<dd><p>Parameter</p></dd>
</dl></dd>
<dt><a name="20"><b class="cmd">::math::special::elliptic_K</b> <i class="arg">k</i></a></dt>
<dd><p>Compute the complete elliptic integral of the first kind
for the argument &quot;k&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">k</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="21"><b class="cmd">::math::special::elliptic_E</b> <i class="arg">k</i></a></dt>
<dd><p>Compute the complete elliptic integral of the second kind
for the argument &quot;k&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">k</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="22"><b class="cmd">::math::special::exponential_Ei</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the exponential integral of the second kind
for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x != 0)</p></dd>
</dl></dd>
<dt><a name="23"><b class="cmd">::math::special::exponential_En</b> <i class="arg">n</i> <i class="arg">x</i></a></dt>
<dd><p>Compute the exponential integral of the first kind
for the argument &quot;x&quot; and order n</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>Order of the integral (n &gt;= 0)</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt;= 0)</p></dd>
</dl></dd>
<dt><a name="24"><b class="cmd">::math::special::exponential_li</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the logarithmic integral for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt; 0)</p></dd>
</dl></dd>
<dt><a name="25"><b class="cmd">::math::special::exponential_Ci</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the cosine integral for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt; 0)</p></dd>
</dl></dd>
<dt><a name="26"><b class="cmd">::math::special::exponential_Si</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the sine integral for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt; 0)</p></dd>
</dl></dd>
<dt><a name="27"><b class="cmd">::math::special::exponential_Chi</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the hyperbolic cosine integral for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt; 0)</p></dd>
</dl></dd>
<dt><a name="28"><b class="cmd">::math::special::exponential_Shi</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the hyperbolic sine integral for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt; 0)</p></dd>
</dl></dd>
<dt><a name="29"><b class="cmd">::math::special::fresnel_C</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the Fresnel cosine integral for real argument x</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="30"><b class="cmd">::math::special::fresnel_S</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the Fresnel sine integral for real argument x</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="31"><b class="cmd">::math::special::sinc</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the sinc function for real argument x</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="32"><b class="cmd">::math::special::legendre</b> <i class="arg">n</i></a></dt>
<dd><p>Return the Legendre polynomial of degree n
(see <span class="sectref"><a href="#section4">THE ORTHOGONAL POLYNOMIALS</a></span>)</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>Degree of the polynomial</p></dd>
</dl></dd>
<dt><a name="33"><b class="cmd">::math::special::chebyshev</b> <i class="arg">n</i></a></dt>
<dd><p>Return the Chebyshev polynomial of degree n (of the first kind)</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>Degree of the polynomial</p></dd>
</dl></dd>
<dt><a name="34"><b class="cmd">::math::special::laguerre</b> <i class="arg">alpha</i> <i class="arg">n</i></a></dt>
<dd><p>Return the Laguerre polynomial of degree n with parameter alpha</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">alpha</i></dt>
<dd><p>Parameter of the Laguerre polynomial</p></dd>
<dt>int <i class="arg">n</i></dt>
<dd><p>Degree of the polynomial</p></dd>
</dl></dd>
<dt><a name="35"><b class="cmd">::math::special::hermite</b> <i class="arg">n</i></a></dt>
<dd><p>Return the Hermite polynomial of degree n</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>Degree of the polynomial</p></dd>
</dl></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">THE ORTHOGONAL POLYNOMIALS</a></h2>
<p>For dealing with the classical families of orthogonal polynomials, the
package relies on the <em>math::polynomials</em> package. To evaluate the
polynomial at some coordinate, use the <em>evalPolyn</em> command:</p>
<pre class="doctools_example">
   set leg2 [::math::special::legendre 2]
   puts &quot;Value at x=$x: [::math::polynomials::evalPolyn $leg2 $x]&quot;
</pre>
<p>The return value from the <em>legendre</em> and other commands is actually
the definition of the corresponding polynomial as used in that package.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">REMARKS ON THE IMPLEMENTATION</a></h2>
<p>It should be noted, that the actual implementation of J0 and J1 depends
on straightforward Gaussian quadrature formulas. The (absolute) accuracy
of the results is of the order 1.0e-4 or better. The main reason to
implement them like that was that it was fast to do (the formulas are
simple) and the computations are fast too.</p>
<p>The implementation of J1/2 does not suffer from this: this function can
be expressed exactly in terms of elementary functions.</p>
<p>The functions J0 and J1 are the ones you will encounter most frequently
in practice.</p>
<p>The computation of I_n is based on Miller's algorithm for computing the
minimal function from recurrence relations.</p>
<p>The computation of the Gamma and Beta functions relies on the
combinatorics package, whereas that of the error functions relies on the
statistics package.</p>
<p>The computation of the complete elliptic integrals uses the AGM
algorithm.</p>
<p>Much information about these functions can be found in:</p>
<p>Abramowitz and Stegun: <em>Handbook of Mathematical Functions</em>
(Dover, ISBN 486-61272-4)</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: special</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#bessel_functions">Bessel functions</a>, <a href="../../../../index.html#error_function">error function</a>, <a href="../../../../index.html#math">math</a>, <a href="../../../../index.html#special_functions">special functions</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div></body></html>
